package com.dhcc.cdc.webservice;

import com.dhcc.cdc.busi.service.*;
import org.springframework.beans.factory.annotation.Autowired;
/**
 * 
 * @ClassName:  DataAccessImpl   
 * @Description:TODO(数据接入接口)   
 * @author: mazhaoyan 
 * @date:   2021年8月19日 下午2:34:03   
 *     
 * @Copyright: 2021 www.mediway.com.cn Inc. All rights reserved. 
 *
 */
public class DataAccessImpl  implements DataAccess {
	@Autowired
	private ICdcPatientService cdcPatientService;//患者信息服务类
	@Autowired
	private ICdcEpisodeService cdcEpisodeService;//就诊信息服务类
	@Autowired
	private ICdcDiagnosisService cdcDiagnosisService;//诊断信息服务类
	@Autowired
	private ICdcSurgeryService cdcSurgeryService;//手术信息服务类
	@Autowired
	private ICdcOrdexecService cdcOrdexecService;//医嘱信息服务类
	@Autowired
	private ICdcEmrService cdcEmrService;//电子病历信息服务类
	@Autowired
	private ICdcExaminationService cdcExaminationService;//检查报告信息服务类
	@Autowired
	private ICdcLabVisitService cdcLabVisitService;//检验样本信息服务类
	@Autowired
	private ICdcLabReportService cdcLabReportService;//检验报告信息服务类
	@Autowired
	private ICdcNurService cdcNurService;//护理信息服务类
	@Autowired
	private ICdcAllergyService cdcAllergyService;//过敏信息服务类
	@Autowired
	private ICdcSignService cdcSignService;//症状体征信息服务类
	@Autowired
	private ICdcExpenseService cdcExpenseService;//费用信息服务类
	@Autowired
	private ICdcHospitalService cdcHospitalService;//院区信息服务类
	@Autowired
	private ICdcLocationService cdcLocationService;//科室、病区信息服务类
	@Autowired
	private ICdcSysUerService cdcSysUerService;//系统用户信息服务类
	@Autowired
	private ICdcOrdmastService cdcOrdmastService;//医嘱字典信息服务类
	@Autowired
	private ICdcLabItemService cdcLabItemService;//检验字典信息服务类
	@Autowired
	private ICdcOrdgroupService cdcOrdgroupService;//医嘱套字典信息服务类
	
	@Override
	public String dataPipe(String dataCode, String dataStr) {
		String result = "";
		// 根据数据代码进入不同的数据处理
		switch (dataCode) {
		case "PATIENT_INFO"://患者信息
			result = cdcPatientService.handleXmlData(dataStr);
			break;
		case "EPISODE_INFO"://就诊信息
			result = cdcEpisodeService.handleXmlData(dataStr);
			break;
		case "DIAG_INFO"://诊断信息
			result = cdcDiagnosisService.handleXmlData(dataStr);
			break;
		case "ORDER_INFO"://医嘱信息
			result = cdcOrdexecService.handleXmlData(dataStr);
			break;
		case "ALLERGY_INFO"://过敏信息
			result = cdcAllergyService.handleXmlData(dataStr);
			break;
		case "EMR_INFO"://电子病历信息
			result = cdcEmrService.handleXmlData(dataStr);
			break;
		case "LABVIST_INFO"://检验样本信息
			result = cdcLabVisitService.handleXmlData(dataStr);
			break;
		case "LAB_INFO"://检验报告信息
			result = cdcLabReportService.handleXmlData(dataStr);
			break;
		case "EXAM_INFO"://检查报告信息
			result = cdcExaminationService.handleXmlData(dataStr);
			break;
		case "SURG_INFO"://手术信息
			result = cdcSurgeryService.handleXmlData(dataStr);
			break;
		case "SIGN_INFO"://症状信息
			result = cdcSignService.handleXmlData(dataStr);
			break;
		case "ENR_INFO"://护理信息
			result = cdcNurService.handleXmlData(dataStr);
			break;
		case "EXP_INFO"://费用信息
			result = cdcExpenseService.handleXmlData(dataStr);
			break;
		case "HOSP_INFO"://医院信息
			result = cdcHospitalService.handleXmlData(dataStr);
			break;
		case "LOC_INFO"://科室信息
			result = cdcLocationService.handleXmlData(dataStr);
			break;
		case "USER_INFO"://用户信息
			result = cdcSysUerService.handleXmlData(dataStr);
			break;
		case "LAB_DICT_INFO"://检验条目信息
			result = cdcLabItemService.handleXmlData(dataStr);
			break;
		case "ORDER_DICT_INFO"://医嘱字典信息
			result = cdcOrdmastService.handleXmlData(dataStr);
			break;
		case "ORDER_GRP_INFO"://医嘱套信息
			result = cdcOrdgroupService.handleXmlData(dataStr);
			break;
		}
		return result;
	}
}
